<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小明购物</title>
</head>
<body>
    <script>
        var ming = prompt("请输入明明购买的商品名称：", ""); //提示对话框
        var num = prompt("请输入明明购买的商品数量：", ""); //提示对话框
        document.write('<b>购物清单</b><br>');
        document.write("商品名称" + '&nbsp;&nbsp;&nbsp;' + "商品数量" + "<br>");
        document.write(ming + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + num + "<br>");
    </script>
</body>
</html>